//package com.imay.live.update;
//
//import android.content.Context;
//import android.graphics.Canvas;
//import android.graphics.Color;
//import android.graphics.Paint;
//import android.graphics.Path;
//import android.graphics.RectF;
//import android.os.Build;
//import android.support.annotation.Nullable;
//import android.support.annotation.RequiresApi;
//import android.util.AttributeSet;
//import android.widget.TextView;
//
///**
// * Created by Administrator on 2017/05/16 0016.
// */
//
//public class RoaTextView extends TextView {
//    Paint paint;
//    Path path;
//
//    public RoaTextView(Context context) {
//        super(context);
//    }
//
//    public RoaTextView(Context context, @Nullable AttributeSet attrs) {
//        super(context, attrs);
//    }
//
//    public RoaTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
//        super(context, attrs, defStyleAttr);
//    }
//
//    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
//    public RoaTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
//        super(context, attrs, defStyleAttr, defStyleRes);
//    }
//
//    @Override
//    protected void onDraw(Canvas canvas) {
//        if (path == null) {
//            path = new Path();
//            paint = new Paint();
//            paint.setStyle(Paint.Style.FILL);
//            paint.setAntiAlias(true);
//            paint.setStrokeWidth(3);
//            paint.setColor(Color.parseColor("#FFECECEC"));
//        }
//        path.reset();
//
////        path.cubicTo(canvas.getHeight() / 2, canvas.getHeight(),0, canvas.getHeight() / 2, 0, canvas.getHeight() / 2);  //设置路径点和终点
////        path.quadTo(-20, canvas.getHeight() / 2, canvas.getHeight() / 2, 0);  //设置路径点和终点
////        path.lineTo(canvas.getWidth() - canvas.getHeight() / 2, 0);
//
//        RectF oval = new RectF(0, 0, getHeight(), getHeight());
//        path.addArc(oval, 90, 180);
//        RectF oval2 = new RectF(getWidth() - getHeight(), 0, getHeight(), getHeight());
//        path.addArc(oval2, 90, 180);
//        path.moveTo(canvas.getHeight() / 2, 0);
//        path.lineTo(canvas.getWidth() - getHeight() / 2, 0);
////        canvas.drawPath(path, paint);
////        path.close();
//        canvas.drawPath(path, paint);
//        super.onDraw(canvas);
//    }
//}
